<?php
namespace app\model\admin\material;

use app\model\admin\basic\BasicContent;
use laytp\BaseModel;

class MaterialSpecial extends BaseModel
{
    protected $name = 'material_special';

    public function content(){
        return $this->hasOne(BasicContent::class,"id","material_id")->bind(["content_name"=>"name","content_icon"=>"icon"]);
    }

    public function style(){
        return $this->hasOne(MaterialStyle::class,"id","material_style_id")->bind(["style_name"=>"name"]);
    }
}